This application claims priority from Korean Patent Application No. 10-2004-0051519, filed on Jul. 2, 2004, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to digital image processing, and more particularly, to a method for eliminating discontinuity of block boundaries of an image encoded in units of blocks and an apparatus thereof.
2. Description of the Related Art
When an image is transmitted through a network with a predetermined bandwidth, or stored in a storage medium, it is important to encode the image data. Many research activities have been being carried out to transmit and store efficiently image data, and among a variety of image encoding methods, transform-based encoding methods are most widely used. In the transform-based encoding, the discrete cosine transform (DCT) technology has been widely used.
Meanwhile, among a variety of image coding standards, there is an H.264 AVC video coding standard. In the H.264 AVC standard, DCT is applied to predicting an infra frame and an inter frame in order to obtain a high compression ratio and is used to encode the difference between a predicted image and an original image. Through the DCT transform, information with lower importance among DCT coefficients is discarded such that the quality of the image when decoded through inverse transform is lowered. That is, because of the compression, the transmission bitrate of image data is lowered, while the quality of the decoded image is degraded. DCT is performed in units of blocks, each obtained by dividing an image into a predetermined size. Since the DCT is performed thus, in units of blocks, a blocking effect in which discontinuity on a boundary between blocks appears occurs.
Motion compensation in units of blocks is another cause of the blocking effect. Motion information of a current block that can be used for decoding an image is obtained by one motion vector determined for each block with a predetermined size in a frame. Also, a predictive motion vector (PMV) is obtained by using a motion vector of a current block and a motion vector of a block adjacent to the current block. The thus obtained PMV is subtracted from an actual motion vector for encoding.
Motion-compensated blocks are generated by copying interpolated pixel values from blocks in other locations in the previous reference frames. Accordingly, pixel values of each block are not linked smoothly and discontinuity occurs on the boundary between blocks. In addition, in the process of copying, the discontinuity between blocks in a reference frame is transferred to a block to be compensated directly. Accordingly, even though a block of a 4×4 size is used in the H.264 AVC, filtering of the decoded image should be performed in order to eliminate the discontinuity on the block boundary.
The blocking effect occurs in the process of block-based transform and quantization as described above, and causes a degradation phenomenon of picture quality in which when a compression ratio increases, the discontinuity on the block boundaries appear regularly as if tiles are laid. As an example of a filter to eliminate the discontinuity, there is a deblocking filter. Meanwhile, in the blocking effect, the discontinuity of an image on the block boundaries includes discontinuity on the horizontal direction edge and discontinuity on the vertical direction edge.
Generally, in a deblocking filter, a vertical direction edge is first filtered and then, a horizontal direction edge is filtered. Accordingly, since it is difficult to perform edge filtering in the vertical direction and edge filtering in the horizontal direction at the same time, time for filtering becomes longer and a memory to temporarily store the result of the vertical direction edge filtering is needed.